title: Using LIKE within CASE in TSQL
body: <p>I would like to select the records that contain the content of the <code>@selctDescription</code> parameter but only when <code>@selctDescription</code>  is not empty. </p>
  
  <p>I have the following, which does not work:</p>
  
  <pre><code>(t.[description] LIKE 
    (
    CASE 
    WHEN @selctDescription = '' THEN t.[description] 
    ELSE ('%' @selctDescription '%') 
    END
    )
  )
  </code></pre>
  
  <p>Can anyone point me in the right direction?</p>