At least one box has green ball
so green ball in 1, or 12 , 123 or 1234 or 12345 , 123456 total =6 cases
or in 2 , 23 or 234 or 2345 , 23456 total =5 cases
or in 3 , 34 or 345 or 3456 total =4 cases
or in 4 , 45 or 456 total =3 cases
or in 5, 56 total 2 cases or in 6 only total 1 case
so total no of ways = 6+5+4+3+2+1=21 option D