IF-Condition

IF-Condition

Is it possible in one form to use a if-condition for a formula???
f.e.
muffin(
type = picklist
values = {"yes", "no"}

bill(
type = formula
value = $drinks*1.5+$lunch*12.0
)

and now i want to have an if condition:

if(this.muffin == "yes"){
$bill = $drinks*1.5+$lunch*12.0+$muffin*5
}

else{
$drinks*1.5+$lunch*12.0
}

and the question is: is it possible???
and if it is possible how?
where do i have to use the if condition in "muffin" or in "bill"?