Этого можно достичь, используя раздел row_number, как показано ниже.
Declare @table1 As table
(
Date varchar(14),
month varchar(15),
DayOfWeek varchar(15)
)
BEGIN
Insert Into @table1(date,month,DayOfWeek) values('2014-01-01',1,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-02',1,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-03',1,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-04',1,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-05',1,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-06',1,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-07',1,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-08',1,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-11',1,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-12',1,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-13',1,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-14',1,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-15',1,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-16',1,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-17',1,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-01-18',1,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-01',2,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-02',2,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-03',2,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-04',2,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-05',2,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-06',2,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-07',2,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-08',2,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-11',2,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-12',2,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-24',2,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-14',2,4)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-15',2,1)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-16',2,2)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-17',2,3)
Insert Into @table1(date,month,DayOfWeek) values('2014-02-18',2,4)
END
Select Date,Month from (
Select *,row_number() over (partition by DayOfWeek,month order by Date) as seqnum from @table1) t2
where seqnum =3 and Dayofweek=3
Выход
Date Month
2014-01-13 1
2014-02-17 2