How to fetch alternate records in sql