How can I create button that can linked to different page based on membership paid plan

You can set
First check the plan and decide what page it should be lniked to then call this function:

function setLink(pageUrl){
    $w('#button1').link = pageUrl;
}