I want to convert this piece of the query to run in SQL Server its taken from an Oracle query:
SELECT
x.JudgmentMonth,
MAX(DECODE(x.RecordType, '1', x.Volumes)) CONSUMER,
MAX(DECODE(x.RecordType, '2', x.Volumes)) COMMERCIAL
FROM
(SELECT
r.JudgmentMonth, r.RecordType, r.Volumes
FROM
dset r) x
GROUP BY
x.JudgmentMonth
I am not familiar with SQL Server any help will much appreciated.