Prometheus Alerts when 3 values differ between each other more than a percent

Hello,
We are using Grafana to plot Prometheus metrics that are scraped from Spring Boot Applications.
We have a use case where we are plotting 3 values on the same graph.
We want to setup alerting that alerts us when there is a difference of configured percentage between any of the values.
For example lets say

  1. value A is 100, value B is 105, value C is 103. If the configured percentage is 10%, we should not get any alert
  2. value A is 100, value B is 105, value C is 103. If the configured percentage is 4%, we should get alert that there is a bigger discrepancy than the configured between any values

Is that possible?
Thanks a lot in advance