title: Stored procedures, return different number of columns
body: <p>I wrote a stored procedure but it doesn't work as I need</p>
  <pre><code>CREATE OR ALTER PROCEDURE get_info 
  @id int = NULL,
  @lang nvarchar(15) = NULL
  AS
  BEGIN
   SET NOCOUNT ON;
   SELECT id,
     CASE @lang
      WHEN 'ru' THEN text_ru
      WHEN 'en' THEN text_en
      ELSE (text_en, text_ru)
     END
   FROM task_text
   WHERE (@id IS NULL OR id = @id);
  END
  </code></pre>
  <p>It doesn't work because case can't return 2 values.</p>
  <p>My perfect stored procedure should work like this:</p>
  <pre><code>exec get_info --&gt; full table id, text_ru, text_en
  exec get_info @id = 1 --&gt; specific id, text_ru, text_en
  exec get_info @lang = 'ru' --&gt; full id, text_ru
  exec get_info @id = 1, @lang = 'ru'--&gt; specific id, text_ru, @lang
  </code></pre>