How to fetch alternate records from the table