This is pretty simple to accomplish, though how exactly to do it can be hard to find.
Quite simply, you add OUTPUT to your parameter lists, on both your procedure definition and your actual call, like so:
Defining:
CREATE PROCEDURE dbo.TestValue…
more »