Do I understand it right that you want to use the operator stored in the factor column? It's not possible to do it directly - SQL doesn't evaluate expressions dynamically. The closest you can get probably is:
Hopefully your database supports the case expression, but even if it doesn't, it probably has an if function or a similar construct.
You'll need to hard code every possible operator into the query. It would be a good idea to put a check constraint on the factor column to only allow characters representing supported operators.