title: MySQL: Retrieving values into different columns
body: <p>Please have a look at the below code.</p>
  
  <pre><code>SELECT Transactions.`idTransactions`,
  Transactions.`Transaction_TimeStamp`,
  Transactions.`idPortfolio`,
  CASE  when Transactions.`Transaction_Amount`&lt; 0  THEN END AS "Encashments"  ELSE END AS "Additions" ,
  Portfolio.Activation 
  FROM Transactions 
  INNER JOIN Portfolio ON Transactions.idPortfolio = Portfolio.idPortfolio 
  WHERE Transactions.idPortfolio=1
  ORDER BY `Transaction_TimeStamp` DESC
  </code></pre>
  
  <p>Here, if the <code>Transactions.Transaction_Amount</code> is >0, then I need to display this value in "Additions" column, else in "Encashment" column. However my code is generating errors as below.</p>
  
  <pre><code>#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS "Encashments"  ELSE END AS "Additions" ,
  Portfolio.Activation 
  FROM Transacti' at line 4 
  </code></pre>
  
  <p>How can I fix this please?</p>