Executes a Sql command and returns a single value from it.