I think the attached XSN does what you describe. All of the logic is in the fairly complicated formula on the default value of my:field4, which I'll reproduce below, but you only need to modify the underlined parts to adapt this to your own scenario:
concat(xdMath:Eval(xdMath:Eval(/my:myFields/my:group1/my:group2[my:field1 = "yes"][position() != last()]/my:field2, 'concat(., ", ")'), ".."), /my:myFields/my:group1/my:group2[my:field1 = "yes"][last()]/my:field2)
What you need to replace is:
/my:myFields/my:group1/my:group2 - The path to your repeating group
my:field1 - The node bound to the checkbox
yes - The value the checkbox has when it's checked
my:field2 - The node with the value you want to display