I am going to report result of a stored procedure (whether it was successful or has error) using a simple select statement before sending prepared record sets. so I just simply insert this select statement before sending real records sets. But even when I wrap these two select statement in a transaction to make them atomic yet if second select statement raises an error the first select executed and gives 'ok' and 'error' at the same time. here is the code:

```
CREATE PROCEDURE my_procedure
  @id INT = NULL
AS
  BEGIN
    SET NOCOUNT ON;
    SET XACT_ABORT ON;

    BEGIN TRY
      BEGIN TRANSACTION;
      SELECT 1 AS [status], 'OK' AS [message];

      SELECT 1/0;
      COMMIT;
    END TRY
    BEGIN CATCH
      ROLLBACK;
      SELECT 0 AS [status], ERROR_MESSAGE() AS [message];
    END CATCH;
  END;

```

How could first select statement be done only if the the second statement is successful?