/* display a different value based on existing column value */

/* in Mysql */

select sex, if(sex='M','male','female'), ssn
from student;



/* Nested */

select price, if(price<1000,if(price<600,'cheap','moderate'),'expenssive') as "price range", description
from course;




/* in Oracle use decode( )  or case  instead */