You can use IF() where in Oracle you would have used DECODE().
mysql> select if(emp_id=1,'X','Y') as test, emp_id from emps;
You can use IF() where in Oracle you would have used DECODE().
mysql> select if(emp_id=1,'X','Y') as test, emp_id from emps;