Validation can mean any number of things. You're going to have to be more concise with what you're looking for.
As for as validating an actual SQL statement, if it runs, it's valid in terms of syntactical validity. If you want to see some insight into what that query is doing under the hood (seeing if it's using the indexes you set up for it, or doing full table scans etc) then you would pass the SQL statement through the EXPLAIN command.
Determining the validity of the outcome of a SQL statement, you could run it against a test data set in a typical unit testing scenario.
However, like i said, your question is vague, please clarify.
"If art interprets our dreams, the computer executes them in the guise of programs!" - SICP
“If at first, the idea is not absurd, then there is no hope for it” - Albert Einstein