if else to case