title: SQL how to call user defined function by dynamic variable name
body: <p>In SQL - I have list of user defined function names in a table. based on the logic i need to call/exec the function.
  Please my high level code logic below,</p>
  <pre><code>DECLARE @MY_FUNCTION VARCHAR(1000); 
  DECLARE @MY_INPUT_PARAMETER INT; 
  DECLARE @MY_OUTPUT_PARAMETER INT;
  
  SET @MY_FUNCTION = '' -- Dynamically function name will be provided based on some big logic
  --Note: function has input and output parameter
  
  --my query 
  -- call the function by @MY_FUNCTION (@MY_INPUT_PARAMETER )
  @MY_OUTPUT_PARAMETER = EXEC @MY_FUNCTION (@MY_INPUT_PARAMETER)
  --Some big sql script using @MY_OUTPUT_PARAMETER
  (
  -- Script goes here
  )
  </code></pre>