title: How to get the string value showing in Result and Messages Tab in SQL Server?
body: <p>I can't seem to find the right answers in google or maybe failed to used the right keywords.</p>
  
  <p>How can I get the string value that is being displayed in</p>
  
  <ol>
  <li>Result Tab</li>
  <li>Messages Tab</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/c2kRN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c2kRN.png" alt="enter image description here"></a></p>
  
  <p>in SQL Server.</p>
  
  <p>Any help is appreciated</p>
  
  <p><strong>EDIT:</strong>
  I want to get the string value and store it in variable which is in a stored procedure.</p>
  
  <p><strong>EDIT</strong><br>
  I want to catch the output message and store it in a variable. This will be handled by stored procedure. So I need an sql syntax to get the string from results tab and messages tab. </p>