You can't have assignment operation inside a case statement, it can only return value which can be assigned to quantity in your above code. So replace attrited = 'true' with whatever value you want to assign to quantity. It will be something like below.
update PD set quantity =
(
case
when ((quantity - @transferqnty) <= 0) then quantity
else (quantity - @transeferqnty)
end
)
from K_RT_PurchaseDet as PD
inner join K_RT_Productdetails as PS on PD.product = PS.sno
where PS.productname = @Purchaseid
In the above i am maintaning the same value for quantity.