That's wierd; you're combining gui and cli for io?
The input within the selectValue method will contain the value entered into the option dialog. Cast that to an integer with Integer.parseInt and assign it to the choice. Then switch on the choice to determine what to do next.
header('HTTP/1.1 420 Enhance Your Calm');