Know What I don't Know: Handling Ambiguous and Unanswerable Questions for Text-to-SQL