title: T-SQL IF statements in ORDER BY clauses
body: <p>Is there a way I can do something like</p>
  
  <pre><code>@sortType
  
  SELECT
      *
  FROM
      table
  ORDER BY
      -- if sortType == id
      table.Id
      -- else if sortType == date
      table.Date
  </code></pre>
  
  <p>How would that syntax look? Thanks.</p>