SQL>
SQL> CREATE OR REPLACE FUNCTION value_in (varname IN VARCHAR)
2 RETURN VARCHAR2
3 IS
4 retval VARCHAR2(2000);
5 BEGIN
6 EXECUTE IMMEDIATE 'BEGIN :val := ' || varname || '; END;' USING OUT retval;
7 RETURN retval;
8 END;
9 /
Function created.
SQL>