How do I perform an IF...THEN in an SQL SELECT statement?
IF...THEN
SQL SELECT
For example:
SELECT IF(Obsolete = \'N\' OR InStock = \'Y\' ? 1 :
You can use Case Statement:
Select Case WHEN (Obsolete = 'N' or InStock = 'Y') THEN 1 ELSE 0 END Saleable, Product.* from Product