title: CASE WHEN bit THEN 'something' ELSE null END shortcut
body: <p>Is there a shortcut in MS SQL Server for a call <strong>CASE WHEN bit THEN 'something' ELSE null  END</strong> ? Is there a way to write it differently?</p>
  
  <p><strong>Example scenario:</strong></p>
  
  <pre><code>DECLARE @data TABLE(IsSomething BIT NOT NULL, Value NVARCHAR(30) NOT NULL);
  
  INSERT INTO @data VALUES
  (1, 'a'),
  (1, 'b'),
  (0, 'c'),
  (0, 'd');
  
  SELECT
  CASE WHEN IsSomething = 1 THEN Value ELSE NULL END,
  CASE WHEN IsSomething = 1 THEN 'string' ELSE NULL END,
  CASE WHEN IsSomething = 0 THEN 'not ' + Value ELSE NULL END
  FROM @data
  </code></pre>
  
  <p>I am especially looking for the variant where the BIT value is 1 (true).</p>
  
  <p>The concern is readability of the select statement and excesively long expression to write for a simple case/if. </p>
  
  <p>I use those expressions in one of my views where it bothers me the most. I am not saying the design of that view or the tables is ideal. <em>(In fact, it is not ideal!)</em></p>