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

Code Example 1

SELECT IF(1>3,'true','false');

Code Example 2

IF(expression ,expr_true, expr_false);

Learn ReactJs, React Native from akashmittal.com