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 :
SELECT CAST( CASE WHEN Obsolete = 'N' or InStock = 'Y' THEN ELSE 0 END AS bit ) as Saleable, * FROM Product