Try either of them
select t1.Id,t1.a,t1.b from Table1 t1 inner join
(select a,b,count(*) as num from Table1 group by a,b having count(*)>1) t2 on t1.A=t2.A and t1.B=t2.b
select t1.Id,t1.a,t1.b from Table1 t1 inner join
(select a,b,ROW_NUMBER() OVER (PARTITION BY a,b ORDER BY a,b) as num from Table1 group by a,b having count(*)>1) t2 on t1.A=t2.A and t1.B=t2.b