title: How to return default value from SQL query
body: <p>Is there any easy way to return single scalar or default value if query doesn't return any row?</p>
  
  <p>At this moment I have something like this code example:</p>
  
  <pre><code>IF (EXISTS (SELECT * FROM Users WHERE Id = @UserId))  
      SELECT Name FROM Users WHERE Id = @UserId  
  ELSE
      --default value
      SELECT 'John Doe'
  </code></pre>
  
  <p>How to do that in better way without using IF-ELSE?</p>