I have a database table called \'tbl_transaction\' with the following definition:
id INT(11) Primary Key action_type ENUM(\'Expense\', \'Inc
MySQL also has IF():
IF()
SELECT id, action_heading, IF(action_type='Income',action_amount,0) income, IF(action_type='Expense', action_amount, 0) expense FROM tbl_transaction