Create table #temp
(
Row_num bigint identity(1,1),
Group_namenvarchar(20),
default_flag bit,
default_value nvarchar(20)
)
insert into #temp (Group_name,default_flag,default_value)
values ('First',1,'Default'),
('First',1,'A'),
('First',1,'B'),
('Second',0,'Default'),
('Second',0,'A'),
('Second',0,'B'),
('Third',1,'Default'),
('Third',1,'A'),
('Third',1,'B'),
('Fourth',0,'Default'),
('Fourth',0,'A'),
('Fourth',0,'B')
select * from #temp
Output should be below
drop table #temp
vishnu dalwadi