title: MS SQL (SAP B1) "Only one expression can be specified in the select list when the subquery is not introduced with EXISTS..."
body: <p>I've used this SQL query for the SAP B1 database, that should run the different queries depends on the user's group:</p>
  <pre><code>    SELECT CASE
             WHEN T0.GroupId = '2'
             THEN
  (
      SELECT T0.Substitute, 
             T0.ItemCode, 
             T1.ItemName
      FROM OSCN T0
           INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
      WHERE T0.CardCode = 'CV-1234'
  )
             ELSE(CASE
                      WHEN(T0.GroupId = '4')
                      THEN
  (
      SELECT T0.ItemCode
      FROM OSCN T0
      WHERE T0.CardCode = 'CV-1234'
  )
                      ELSE ''
                  END)
         END
  FROM OUGR T0
       INNER JOIN USR7 T1 ON T1.UserId = T1.UserId
  WHERE T1.UserId = 'George'
  </code></pre>
  <p>But when I run it, I get an error &quot;Only one expression can be specified in the select list when the subquery is not introduced with EXISTS&quot;.</p>
  <p>Appreciate any help.
  Thanks in advance.</p>