title: How to use Case in SQL?
body: <p>I have a query </p>
  
  <pre><code>Select Id,DeviceId,TankCount,Tank1_Level,Tank2_Level,ReadTime from Table 
  
  
  
    Id  TankCount   DeviceId  Tank1_Level   Tank2_Level    ReadTime
  
     1    1           123            20         50         2014-11-07 14:39:33.277
     2    2           456            52         78         2014-11-07 14:39:33.277
     3    1           789            44         50         2014-11-07 14:39:33.277
  </code></pre>
  
  <p>Tank2_Level is 50 in all TankCount=1 rows.</p>
  
  <p>I dont want display Tank2_Level when value equal to 50.</p>
  
  <p>TankCount int,Tank1_Level int,Tank2_Level int.</p>
  
  <pre><code>Id  TankCount   DeviceId        Tank1_Level   Tank2_Level                   ReadTime
  
     1    1           123            20         null or empty         2014-11-07 14:39:33.277
     2    2           456            52         78                    2014-11-07 14:39:33.277
     3    1           789            44         null or empty         2014-11-07 14:39:33.277
  </code></pre>