MySql - How get value in previous row and value in next row


SELECT *,
       (SELECT value FROM Table1 e1 WHERE e1.id < e.id ORDER BY id DESC LIMIT 1 OFFSET 0) as prev_value,
       (SELECT value FROM Table1 e2 WHERE e2.id > e.id ORDER BY id ASC LIMIT 1 OFFSET 0) as next_value
FROM Table1 e
WHERE id=3;
http://sqlfiddle.com/#!9/fcff21/1