title: SQL CASE query Msg 116- Only one expression can be specified in the select list when the subquery is not introduced with EXISTS
body: <pre><code>SELECT CASE 
          WHEN (SUM(cashBySum) &gt; SUM(cashByName))
              THEN (
                      SELECT Sale.partyDBId
                          ,Sale.id
                          ,Sale_Products.quantity
                          ,Sale_Products.FinalWeight
                          ,Sale_Products.finalRate
                          ,Sale_Products.SaleDBid
                          ,product.productNameUR
                      FROM Sale
                      INNER JOIN Sale_Products ON Sale.id = Sale_Products.SaleDBid
                      INNER JOIN product ON Sale_Products.productBDid = product.id
                      WHERE (Sale.partyDBId = '20031')
                          AND (
                              CAST(Sale.SaleDate AS DATE) BETWEEN '2015-04-09 12:31:41.000'
                                  AND '2016-04-09 12:31:41.000'
                              )
                      )
          WHEN (SUM(cashBySum) &lt; SUM(cashByName))
              THEN N' بنام'
          ELSE ''
          END AS balancetype
      ,SUM(cashBySum) - SUM(cashByName) AS balance
      ,ABS(SUM(cashBySum) - SUM(cashByName)) AS blc
      ,partyId
  FROM leger AS leger_1
  WHERE (partyId = '20031')
      AND (DATE &lt; '2016-04-09 12:31:41.000')
  GROUP BY partyId
  </code></pre>