Check out example codes for "mysql select if zero". It will help you in understanding the concepts better.

Code Example 1

SELECT IF((SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END),'true','false');

Learn ReactJs, React Native from akashmittal.com