CREATE PROCEDURE PROC_Cal
@NUM1 DECIMAL(20,6),@NUM2 DECIMAL(20,6),@CalType
AS
BEGIN
SET NOCOUNT ON;
SELECT CASE @CalType WHEN '+' THEN @NUM1+@NUM2
WHEN '-' THEN @NUM1-@NUM2
WHEN '*' THEN @NUM1*@NUM2
WHEN '/' THEN @NUM1/@NUM2
ELSE @NUM1+@NUM2
END AS RESULT
END