If you ask the question: "Give me all the lines that have the next field id1 for the city," and then simply:
select distinct t1.* from Table1 t1 join Table1 t2 on t2.town = t1.town and ABS(t1.ID1 - t2.ID1) = 1 order by 1, 2
See SQLFiddle for this.
To also match another column, add a condition to the join, for example:
select distinct t1.* from Table1 t1 join Table1 t2 on t2.town = t1.town and t2.state = t1.state and ABS(t1.ID1 - t2.ID1) = 1 order by 1, 2
source share