title: SQL Server: UPDATE based on whether a value is greater or lesser than another value, in a single query
body: <p>I'm looking to update SQL Server in a single query based on a date, however the value updated depends on whether it is greater or lower than a provided value (in this scenario a date).</p>
  <pre><code>UPDATE table 
  SET id = 'over'
  WHERE date &gt; '2022-01-01'
  
  UPDATE table
  SET id = 'under'
  WHERE date &lt; '2022-01-01'
  </code></pre>
  <p>I can do this individually via the queries above. My question is, is there a way in SQL Server to combine these two queries and run this update in a  single update query?</p>
  <p>EDIT: to show the SET values are strings.</p>