I need to get the result from the catch block from store procedure and pass it as output parameter. So I could use result in select statement with a field value. For now it is executing correctly, but the select statement returns me NULL Value. 

```
CREATE procedure [dbo].[sp_calc] @mathexpr NVarchar(20), @returnValue decimal(9,2) out
as
declare @query varchar(800)
BEGIN TRY
    SELECT @returnValue=CAST(@mathexpr as decimal(9,2))
END TRY
BEGIN CATCH
    SET @query='SELECT CAST('+@mathexpr+' as decimal(9,2))'
    EXECUTE(@query)
END CATCH

declare @result decimal(9,2)
exec sp_calc @mathexpr='1.600*2.5478/1.2',@returnValue=@result out
select @result as result

```

Thank's for help.