Here is a query to get the results in the order you have specified.
And also update the variable table @INFO_T with the desired result.
From the CTE format, you should be able to see how the data is being manipulated.
declare @INFO_T table (Id int, Name varchar(100), Seq_no int);
insert into @INFO_T (Name, Id)
select
'Arijit' Name,
120 Id
union select 'Suman', 121
union select 'Priyam', 122
union select 'Arijit', 123
union select 'Suvayu', 124
union select 'Priyam', 125
;
with GroupNames as (
select
Name,
Id,
row_number() over (partition by name order by id) as rowid
from @INFO_T OrigData
), NameSequence as (
select
Name,
row_number() over (order by id) as Seq_No
from GroupNames
where rowid = 1
)
update FinalData
set FinalData.Seq_No = NameSequence.Seq_No
from @INFO_T OrigData
inner join NameSequence
on OrigData.name = NameSequence.name
inner join @INFO_T FinalData
on OrigData.Id = FinalData.Id
;
select Name, Id, Seq_no
from @INFO_T
order by Id;
Hope that helps out.