Based on your sample

Sheet1!C2
=(MIN(ABS($B2-INDEX(Sheet2!$B$2:$F$6,MATCH($A2,Sheet2!$A$2:$A$6,0),0)))<=1)+0
confirmed with CTRL + SHIFT + ENTER (enter alone will not suffice)
In your example all will return 1 (ie all are valid)