title: SQL's Fallthrough CASE Statement
body: <p>In C# we can write</p>
  
  <pre><code>switch(num)
  {
    case 0:
    case 1: // do something; break;
    case 2:
    ............
    ...........
    case n: // do something break;
    default: //do something; break;
  }
  </code></pre>
  
  <p>How can I achieve the similar kind of stuff in SQL SERVER ?</p>
  
  <p>I am not talking about the simple way of writing CASE in SQL SERVER. I am talking about if I need to perform the same king of operation in 2 or more case's as what I showed in C# code snippet, how to do the similar kind of stuff in SQL's CASE?</p>
  
  <p>EDIT: </p>
  
  <p>I got some nice answers from here already. How can I convert the following </p>
  
  <pre><code>SELECT CASE 
           WHEN [A]= num THEN '-' ELSE '' END [A], 
           CASE WHEN [B]= num THEN '-' ELSE '' END [B], 
           CASE WHEN [C]= num THEN '-' ELSE '' END [C],
           CASE WHEN [D]= num THEN '-' ELSE '' END [D]
  </code></pre>
  
  <p>...into something like:</p>
  
  <pre><code>SELECT CASE WHEN [A], 
         CASE WHEN [B], 
         CASE WHEN [C], 
         CASE WHEN [D] = num THEN '-' ELSE '' END [A] or [B] or [C] or [D]
  </code></pre>
  
  <p>Actually I need this in a PIVOT query. Last night I solved the problem. But I am not convinced with this way of writing. Because everytime, I am doing the same thing. So is there any better way of presenting this?</p>