Hello Dmytro,
Unfortunately, there is no such possibility using business unit membership rules. However, it should work just fine using a scheduled task and a script. The script will query your SQL database and then add a dedicated membership rule for each computer to the business unit.