title: SQL CASE returning two values
body: <p>I'm writing my first SQL CASE statement and I have done some research on them. Obviously the actual practice is going to be a little different than what I read because of context and things of that nature. I understand HOW they work. I am just having trouble forming mine correctly. Below is my draft of the SQL statement where I am trying to return two values (Either a code value from version A and it's title or a code value from version B and its title). I've been told that you can't return two values in one CASE statment, but I can't figure out how to rewrite this SQL statement to give me all the values that I need. Is there a way to use a CASE within a CASE (as in a CASE statement for each column)? </p>
  
  <p>P.S. When pasting the code I removed the aliases just to make it more concise for the post</p>
  
  <pre><code>SELECT
      CASE
          WHEN codeVersion = A THEN ACode, Title
          ELSE BCode, Title
      END
  FROM Code.CodeRef
  WHERE ACode=@useCode OR BCode=@useCode 
  </code></pre>