title: IF / ELSE depending on result of stored procedure
body: <p>I've the following stored procedure:</p>
  
  <pre><code>ALTER PROCEDURE [dbo].[CheckAdminExists]
      @SID NVARCHAR(50),
      @AdminName NVARCHAR(MAX)
  AS 
      SELECT
          Administrator.ID
      FROM
          Administrator
      WHERE
          Administrator.SID = @SID
          AND Administrator.Name = @AdminName
  GO
  </code></pre>
  
  <p>Now I would like to create another SP with a code like that:</p>
  
  <pre><code>IF NOT NULL (EXECUTE CheckAdminExists 'S-1','Admin')
  --do something
  ELSE
  --do something else
  </code></pre>
  
  <p>What's the right syntax for doing it?</p>