Added select() function

Added select() to allow user to specify the select type (value/text) as
a tuple and then act accordingly.