title: Set default values of a column in select statement
body: <p>I am using SQL Server database and want to set a default value to a column of a table</p>
  
  <pre><code>SELECT
    COUNT(DISTINCT CASE WHEN id = '5' THEN sid ELSE '0' END) AS 'total'
  FROM records
  </code></pre>
  
  <p>I want to set a default value to 0 if this query is not returning anything.</p>