title: Sum all column value in a row in SQL Server
body: <p>I have a table in SQL Server that has 34 columns.</p>
  
  <p>I need sum all column values in a row in SQL Server. </p>
  
  <p>Table : <code>[CALEN]</code></p>
  
  <p>Columns: </p>
  
  <pre><code>YEAR_   | MONTH_  |D1 | D2 | D3 | D4 | D5 .... | D31 | Days
  ------------------------------------------------------------
  1392    | 12      | 1 | 1  | 2  | 1  |  4  ... | 0   | 29
  </code></pre>
  
  <p>I want calc count columns that have 1 value Calc this query:</p>
  
  <pre><code>select [All_column value is 1 and Start With D] 
  FROM [CALEN]   
  WHERE YEAR_ = 1392 and MONTH_ = 12
  </code></pre>