With a couple of db tables like this
Table: user Table: role
+---------+----------+--------+ +---------+---------------+-----------+------------+
| user_id | username | points | | role_id | role_name | point_min | points_max |
+---------+----------+--------+ +---------+---------------+-----------+------------+
| 1 | John | 66 | | 5 | - | 0 | 100 |
| 2 | Paul | 101 | | 6 | Contributor | 101 | 1000 |
| 3 | George | 3000 | | 7 | Author | 1001 | 10000 |
| 4 | Ringo | 200000 | | 8 | Editor | 10001 | 100000 |
+---------+----------+--------+ | 9 | Administrator | 100001 | 999999999 |
+---------+---------------+-----------+------------+
Then a simple query
SELECT username
, rolename
FROM user u
JOIN
role r ON u.points BETWEEN r.points_min AND r.points_max;
does the job for you
+----------+---------------+
| username | rolename |
+----------+---------------+
| John | - |
| Paul | Contributor |
| George | Author |
| Ringo | Administrator |
+----------+---------------+