I don't really see the problem of declaring the constants in an array.
However if you are really against that you can write a helper function which will take in the selector String and return the constant. This could make your code cleaner
double getConstant(String selector) {
// some logic
}
Then your other function would be a bit cleaner
public double doSomething(int inputOne, String selection){
//being const... one of the double vars defined above,
//selected based on the String selection
return inputOne * getConstant(selection);
}
The benefit of doing it this way would be your logic for selecting a constant from a selector would be in one place rather than in all functions where you need the constants.