title: SQL Server : SELECT CASE return NULL
body: <p>I'm trying to do a <code>SELECT</code> in which if the <code>CurrencyCode</code> is = '', then I would like the result to be return as <code>NULL</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>INSERT INTO Currency (CurrencyCode, CurrencyName)
      SELECT 
          CurrencyCode,
          CASE
              WHEN CurrencyCode = ''
                THEN NULL
          END
      FROM Contract
  </code></pre>
  
  <p>Can it be done?</p>