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 :
Use a CASE statement:
SELECT CASE WHEN (Obsolete = 'N' OR InStock = 'Y') THEN 'Y' ELSE 'N' END as Available etc...