SELECT
ISNULL(SUM(PBFSALARY),0) PBFSALARY,
ISNULL(SUM(CREDITSALARY),0) CREDITSALARY,
ISNULL(SUM(DEBITSALARY),0) DEBITSALARY
FROM
(
SELECT
(CASE WHEN E.Mode ='U' THEN ES.SALARY ELSE 0 END) AS PBFSALARY,
(CASE WHEN E.Mode ='C' THEN ES.SALARY ELSE 0 END) AS CREDITSALARY,
(CASE WHEN E.Mode ='M' THEN ES.SALARY ELSE 0 END) AS DEBITSALARY
FROM
yourTable
)
AS a
Happy Coding!
:)