Ok, I found it on the help about SQL:

CASE
WHEN Switch = 'J' THEN
Quantity * Price
ELSE
Quantity * Price * Content
END