Below is my select statement...what I'd like to do is to add a column to the select statement, that is an if statement of sorts so using our select statment below, we would calculate 5% of the amount column and the the result is greater than 50...then compute the something...if it's greater than 40 do another computation...is this possible?
select custid, companyname, invdate, txnref, amount, costofsales
from Whatever
where salesrep = 'Brian' and
amount is not null
order by invdate