title: SQL Server CASE with multiple conditions
body: <p>I'm trying to figure out how to do a SQL Server CASE command with multiple conditions.</p>
  
  <p>I'm trying to use the conditions </p>
  
  <pre><code>If column_a = 'test' AND column_b IS NULL OR (column_b IS NOT NULL AND Column_c = Column_d) OR Column_e &gt;= 480 THEN 'OK'
  ELSE 'CHECK'
  END
  </code></pre>
  
  <p>So broken down what I'm trying to say is:</p>
  
  <pre><code>If column_a = 'test' AND column_b IS NULL return 'OK'
  OR If column_a = 'test' AND (column_b IS NOT NULL AND Column_c = Column_d) OR Column_e &gt;= 480 THEN 'OK'
  </code></pre>
  
  <p>So what I wrote for the statement is </p>
  
  <pre><code>CASE WHEN column_a = 'test' AND column_b IS NULL OR (column_b IS NOT NULL AND Column_c = Column_d) OR Column_e &gt;= 480 THEN 'OK'
  ELSE 'CHECK'
  END
  </code></pre>
  
  <p>I'm not getting any errors just not getting the desired results.  Is that the correct order of multiple AND OR statements in SQL Server?</p>