Pick a number from a list if condition is meet