Using SELECT function

instead of using IF and ELSE IF statements