Convert if to case