This isn't too bad if you have a string splitter. I like this one, especially for this purpose. Taking the data you posted you need another column for the primary key. Then you can do this entirely set based, no looping required like in the answer proposed as a duplicate.
This looks a LOT like homework but it also was a fun challenge on a Friday so I decided to whip something together.
declare @Something table
(
SomeValue varchar(50)
, SomeKey int identity
)
insert @Something
select 'Today is sunday' union all
select 'Hi how are you' union all
select 'Hello i am bharadwaj' union all
select 'Hi i am fine' union all
select 'Help me out';
with ParsedWords as
(
select SomeKey
, Item
, x.ItemNumber
from @Something
cross apply dbo.DelimitedSplit8K(SomeValue, ' ') x
)
, ReversedWords as
(
select SomeKey
, LOWER(STUFF((select ' ' + p2.Item
from ParsedWords p2
where p2.SomeKey = p.SomeKey
order by p2.ItemNumber desc
for XML PATH('')), 1, 1, '')) as Reversed
from ParsedWords p
group by p.SomeKey
)
select UPPER(LEFT(Reversed, 1)) + LOWER(SUBSTRING(Reversed, 2, len(Reversed)))
from ReversedWords rw
order by rw.SomeKey