title: CASE syntax inside a WHERE clause on MSSQL
body: <p>I have the following SQL syntax on MSSQL </p>
  
  <pre><code>SELECT
    id,
    firstName,
    lastName
  FROM
    Person
  WHERE
    ((CASE WHEN @Filter = 'firstName' THEN @Value END) = firstName ) or
    ((CASE WHEN @Filter = 'lastName' THEN @Value END) = lastName ) 
  </code></pre>
  
  <p>It's working but I don't know if there is a better and more efficient way to do this.</p>
  
  <p>Thanks in advanceName</p>