Non ti basta verificare il numero di righe restituite ed utilizzare un IF?