title: SQL query to find first six characters of the first name if the name is too short append $
body: <p>Attached two images the first image is the question second image is the code that which I tried. I am stuck with append $ . I have even added my code</p>
  <p><a href="https://i.stack.imgur.com/QSC2m.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QSC2m.jpg" alt="enter image description here" /></a></p>
  <p>T-sql:</p>
  <pre><code>CREATE TABLE Tab1 (
  tname VARCHAR (50)
  );
  
  INSERT INTO Tab1(tname)
  VALUES ('Ravi Ashwin'),
  ('Mahendra Singh Dhoni'),
  ('Shikhar Dhawan');
  
  Select a tname, substring (tname, 1,6) AS First_Sic_character, LEN (tname) AS Character_count,
       CASE WHEN LEN(tname) BETWEEN 0 AND 12 THEN 'SHORT &amp; SWEET'
            WHEN LEN(tname) BETWEEN 13 AND 15 THEN 'MEDIUM &amp; PREMIUM'
            WHEN LEN (tname) &gt; 15 THEN ' LENGHTY$LOVELY'
  END AS Category
  From Tab1
  </code></pre>