SUM CASE using example:
SELECT
DISTINCT(p.`ProductID`) AS ProductID,
SUM(IF(p.`PaymentMethod`='Cash',Amount,0)) AS Cash_,
SUM(IF(p.`PaymentMethod`='Check',Amount,0)) AS Check_,
SUM(IF(p.`PaymentMethod`='Credit Card',Amount,0)) AS Credit_Card_,
SUM( CASE PaymentMethod
WHEN 'Cash' THEN Amount
WHEN 'Check' THEN Amount
WHEN 'Credit Card' THEN Amount
END) AS Total
FROM
`payments` AS p
GROUP BY p.`ProductID`;
SQL FIDDLE: http://www.sqlfiddle.com/#!9/23d07d/18