how to return x in mysql if value is equal to 1 code example
Example 1: if inside select mysql
SELECT IF(1>3,'true','false');
Example 2: mysql use if on select
IF(expression ,expr_true, expr_false);
SELECT IF(1>3,'true','false');
IF(expression ,expr_true, expr_false);