title: Select multiple values via CASE statement?
body: <p>I have a Vehicle table with an Owner_ID field in it. This Owner_ID will correspond to either the ID field in a Customer table or the ID field in a Business table. I am looking to return different values depending on the table that the ID belongs to.</p>
  
  <p>I have this statement:</p>
  
  <pre><code>SELECT v.Make, v.Model
  FROM Vehicle v
  LEFT JOIN Customer c ON c.ID = v.Owner_ID
  LEFT JOIN Business b ON b.ID = v.Owner_ID
  </code></pre>
  
  <p>So say I want to return the customer surname if the Owner_ID = Customer.ID, and the business name if Owner_ID = Business_ID. I know I can use the <code>CASE</code> statement as such:</p>
  
  <pre><code>SELECT v.Make, v.Model,
      CASE WHEN c.ID IS NOT NULL THEN c.Surname
          WHEN b.ID IS NOT NULL THEN b.Name
  </code></pre>
  
  <p>But is there a way to get multiple values from one case statement? Something like: (I know this is completely wrong by the way.)</p>
  
  <pre><code>SELECT v.Make, v.Model,
      CASE WHEN c.ID IS NOT NULL THEN
              SELECT c.Surname, c.Date_Of_Birth
          WHEN b.ID IS NOT NULL THEN
              SELECT b.Name, b.Founded
  </code></pre>
  
  <p>Or will I have to do:</p>
  
  <pre><code>SELECT v.Make, v.Model,
      CASE WHEN c.ID IS NOT NULL THEN c.Surname
          WHEN b.ID IS NOT NULL THEN b.Name
      END AS "Name",
      CASE WHEN c.ID IS NOT NULL THEN c.Date_Of_Birth
          WHEN b.ID IS NOT NULL THEN b.Founded
      END AS "DOB/Founded"
  </code></pre>