• but i need loop or condtion hwo to do it

    example if primarycondition = 'HF'

    then update table a

    set secondary condtion = null

    if there is no primary condition = 'HF'

    then

    if primarycondition = 'CAD'

    update table a

    set secondarycondition = primarycondition

    except for primarycondition ='CAD'