How to add columns according to conditions

Hello all.

I want to add a new “col3” column with a combination of col1 and col2.

Break when col2 is “1”, increment and combine with col1 to add col3.

Please let me know how I can help.