You can do what you want using conditional aggregation:
select pa,
(max(iif(paramname = 'Amount1', setvalue, 0)) +
max(iif(paramname = 'Amount2', setvalue, 0))
) *
max(iif(paramname = 'Amount3', setvalue, 0))
from t
group by pa;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…