Try this
Create table #temp ( ID int, KeptValue NVARCHAR(20) , SPENT numeric(18,3))
INSERT INTO #temp select 1,'KeptValue1', 20
INSERT INTO #temp select 2,'KeptValue1', 21
INSERT INTO #temp select 3,'KeptValue2', 22
INSERT INTO #temp select 4,'KeptValue2', 20
INSERT INTO #temp select 5,'KeptValue2', 20
INSERT INTO #temp select 6,'KeptValue3', 20
INSERT INTO #temp select 7,'KeptValue3', 23
INSERT INTO #temp select 8,'KeptValue3', 24
INSERT INTO #temp select 9,'KeptValue4', 28
INSERT INTO #temp select 10,'KeptValue4', 23
INSERT INTO #temp select 11,'KeptValue5', 24
INSERT INTO #temp select 12,'KeptValue6', 28
select * FROM #temp
DELETE
FROM #temp
WHERE ID
in(
select ID from
(SELECT Id, (ROW_NUMBER() OVER(PARTITION BY KeptValue order by SPENT desc)) as R
from #temp
) as RowsNm
WHERE R >1)
select * from #temp
drop table #temp