1 Samuel 30:7-8

7 Then David spoke to Abiathar the priest, Ahimelech's son. David said to him, ‘Bring the priests' ephod to me.’ So Abiathar took the ephod to David. 8 David asked the Lord, ‘Should I chase after the men who attacked our town? Will I catch them?’

The Lord answered, ‘Yes, chase after them and you will certainly catch them. You will rescue your families.’

30:8David used the special stones in the ephod (Urim and Thummim) to find out God's answer.