How to get previous row value
You can use LAG() and LEAD() Function to get previous and Next values.
SELECT
LAG(t.Value) OVER (ORDER BY t.ID) PreviousValue,
t.value Value,
LEAD(t.value) OVER (ORDER BY t.ID) NextValue
FROM table t
GO
SELECT t.*,
LAG(t.Value) OVER (ORDER BY t.ID)
FROM table AS t
This should work. The Lag function gets the previous row value for a specific column. I think this is what you want here.