Manufacturing BOM Min and Max

I need help
Can someone advise me?
At BOM, when I product some product, it may get qty between min and max quantity, how can we handle that?
Let Say,
Raw A, 1 Qty
Raw B, 5 Qty
Finished Goods, Item C
May get 3 to 5
Raw A will use 1 qty to produce one batch
Raw B will use depends on Finished Goods, when I get 3 of C, B will deduct 3
when I get 4 Cs, B will deduct 4
when I get 5 Cs, B will deduct 5
thanks in advance