Assuming you want to wait for all the buttons to be clicked (which seems to be the case given the answer you accepted), and assuming you are using ECMA 2017, you can use the more modern async/await pattern.
const btna = $("#btna");
const btnb = $("#btnb");
const btnc = $("#btnc");
async function handler(btn) {
return new Promise((resolve) => {
btn.on("click", () => {
resolve(`clicked ${btn.attr("id")}`);
});
});
}
(async () => {
let values = await Promise.all([handler(btna), handler(btnb), handler(btnc)]);
console.log(values);
})();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="btna">btna</button>
<button id="btnb">btnb</button>
<button id="btnc">btnc</button>
Based on your question though, it sounds like you don't want to wait until all buttons are clicked. You just want to log different values when btnb is clicked after btna vs btnc is clicked after btna. In that case, you don't need promises at all and can just do this:
const btna = $("#btna");
const btnb = $("#btnb");
const btnc = $("#btnc");
btna.click(() => {
btnb.on("click", clickHandler);
btnc.on("click", clickHandler);
});
function clickHandler() {
console.log(this.id);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="btna">btna</button>
<button id="btnb">btnb</button>
<button id="btnc">btnc</button>