Pandya holds his nerve on final ball to win thriller for India