Select in DB by input