In several other languages I have written in, there is a native function that will evaluate an expression. Unfortunately, Oracle does not have this natively. From another web site I found a simple way to achieve this function.
create or replace function eval (expr varchar2)
execute immediate 'begin :result := ' || expr || '; end;'
using out ret;