LLM Internal States Reveal Hallucination Risk Faced With a Query