Du skal flytte WHERE-operatoren over projektlisten, hvor RowNumber-kolonnen oprettes. Brug en afledt tabel eller en CTE:
SELECT *
FROM (
SELECT *, ROW_NUMBER() OVER (...) as RowNumber
FROM ...) As ...
WHERE RowNumber = ...
den tilsvarende CTE er:
WITH cte AS (
SELECT *, ROW_NUMBER() OVER (...) as RowNumber
FROM ...)
SELECT * FROM cte
WHERE RowNumber = ...