Define an output parameter and pass value to that parameter as you wish
ALTER PROCEDURE [dbo].[InsertData1]
@Result int output,
Set @Result = 1;
PRINT 'Unexpected error occurred!'
Set @Result = 0;
let me know if this is useful :)
Updates : If you don't want to return No of rows affected by query/queries
use : Set NoCount On
I updated only what is required to resolve your error... All other code should remain same as your original. Please check again...
Don't forget to accept as answer if it helps you.