You can try this:
SELECT descricao
FROM TABLE
WHERE ID = FLOOR(RAND() * 3 + 2)
LIMIT 1;
The RAND()
function will return a floating-point random number between 0 and 1, that is, a decimal number. To limit the result between a specific number range, which includes both the minimum number and the maximum number, you make the following account:
FLOOR( RAND() * (max - min + 1) + min )
The FLOOR()
function will disregard the decimal places, returning only the integer part of a decimal number.
Source: MySQL FLOOR () function - w3resource < MySQL RAND () function - w3resource
Mysql Rand () between 2 values · GitHub