Convert oracle style deocde statements to case statements