You will need to build (either enter it, or create dynamically based on your table) an SQL query like:
SELECT functionid ,CASE functionid WHEN 1 THEN dbo.Function_1() WHEN 2 THEN dbo.Function_2() WHEN 3 THEN dbo.Function_3() END AS results FROM List_of_Functions
Instead of creating all these functions, would it not be better to create one function and pass the value that the function can use to differentiate processing? as:
SELECT functionid ,dbo.Function(functionid) AS results FROM List_of_Functions_Parameters
source share