WITH tempTable(Column1)
AS
(
SELECT 'chaitanya' [Column1] UNION ALL SELEC`T SUBSTRING(Column1,1,LEN(Column1)-1) FROM tempTable WHERE LEN(Column1)>0
)
SELECT * FROM tempTable ORDER BY LEN(Column1)
Result:
c
ch
cha
chai
chait
chaita
chaitan
chaitany
chaitanya