Convert big if statement to a case statement