It's bit tricky, you need to check this in constructed list. Then you need to check constructed list's first item for assigning brand.

I am going to explain this with detail example. Let's say we have Q1 question as multiple select question with 3 options and we had set up Quota "Brand". Now we need to add brand from Q1List based on least fill. I am going to create constructed list "AssignBrand"

Begin Unverified Perl
my $sum1=99999;
my $sum2=99999;
my $sum3=99999;
my @sum_value;
my @sum_min;
if(VALUE('Q1_1')==1 and ISQUOTACELLOPEN('Brand',1) )
{
$sum1=QUOTACELLCOMPLETES("Brand",1);
}
if(VALUE('Q1_2')==1 and ISQUOTACELLOPEN('Brand',2) )
{
$sum2=QUOTACELLCOMPLETES("Brand",2);
}
if(VALUE('Q1_3')==1 and ISQUOTACELLOPEN('Brand',3) )
{
$sum3=QUOTACELLCOMPLETES("Brand",3);
}
$sum_value[0][0]=$sum1;
$sum_value[1][0]=$sum2;
$sum_value[2][0]=$sum3;
$sum_value[0][1]="1";
$sum_value[1][1]="2";
$sum_value[2][1]="3";
@sum_min=sort{$a->[0]<=>$b->[0]}@sum_value;
ADD("Q1List",$sum_min[0][1]);
End Unverified

For Quota questions, you need to check logic using constructed list first item. So logic would be ListValue(AssignBrand,1)=1 for cell 1, ListValue(AssignBrand,1)=2 for cell 2 and ListValue(AssignBrand,1)=3 for cell 3.

Let me know for any clarification.