I have a database table called \'tbl_transaction\' with the following definition:
id INT(11) Primary Key action_type ENUM(\'Expense\', \'Inc
Try to use IF(condition, value1, value2)
IF(condition, value1, value2)
SELECT ID, HEADING, IF(action_type='Income',action_amount,0) as Income, IF(action_type='Expense',action_amount,0) as Expense