select mytable scan for iif(empty(variable1), field2 = variable2, field1 = variable1) * Code here endscan