Is there any way to get the if statement to evaluate a query? SELECT if(5>0,\'EQ_Type\',\'*\') FROM EQUIPMENT; Resulting in: +-----------------------+ | IF(5>0,\'EQ_Type\',
Just remove the single quotes.
SELECT if(5>0,EQ_Type,'*') FROM EQUIPMENT;