title: How to check condition in then block using SQL Server?
body: <p>I'm trying to check </p>
  
  <pre><code>SELECT 
      *
  FROM
      table 
  WHERE
      CASE
         WHEN startdate IS NULL 
            THEN updatedon &gt;= enddate 
            ELSE updatedon BETWEEN startdate AND enddate 
  </code></pre>
  
  <p>I'm getting error in THEN block in the condition ">". </p>