<p>How do I perform an <code>IF...THEN</code> in an <code>SQL SELECT</code> statement?</p>

<p>For example:</p>

<pre><code>SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product
</code></pre>

```
```
SELECT  
(CASE 
     WHEN (Obsolete = 'N' OR InStock = 'Y') THEN 'YES'
                                            ELSE 'NO' 
 END) as Salable
, * 
FROM Product
```
```