Creating new columns based on 3 column and create new data frame
The question could have been framed better. Checkout the code below, in which your final dataframe will be in output.

import pandas as pd

input_array = [["rs123", "T", "C", 0, 0, 1, 1, 0, 0, 1, 0, 0], ["rs124", "A", "G", 0, 0, 1, 0, 1, 0, 0, 0, 1]]

raw_pd = pd.DataFrame(input_array).astype(str)

def change(a):
    if list(a)[2]+list(a)[3]+list(a)[4] == "100":
        return list(a)[0] + list(a)[0]
    elif list(a)[2]+list(a)[3]+list(a)[4] == "010":
        return list(a)[0] + list(a)[1]
    else:
        return list(a)[1] + list(a)[1]

output = pd.DataFrame()

output['S1'] = raw_pd[[1, 2, 3, 4, 5]].apply(lambda x: change(x), axis = 1)

output['S2'] = raw_pd[[1, 2, 6, 7, 8]].apply(lambda x: change(x), axis = 1)

output['S3'] = raw_pd[[1, 2, 9, 10, 11]].apply(lambda x: change(x), axis = 1)

output['SNP'] = raw_pd[0]




Hope this helps ;) Mark this as the correct answer if you have no other doubts.