update T_Product set amount=( case when quantity<10 then amount*(1-0.1) when quantity between 10 and 20 then amount*(1-0.2) else amount*(1-0.3) end )