Should click on certain area, depends on upcoming number on webpage

I have small task which is, I should click certain area in web page depends on numbers.
For Example:

  1. If number showing 22, should click on certain area in bottom of the page
  2. If number showing 15, should click on certain area in top of the page
    Note: For each time numbers will be changing.

Please guide me anyone with this.

Are you aware of the if/then command?