Right now the onchain and lightning layers are separate and the only way you can switch between them is opening or closing channels.
We are looking to change this somewhat soon either with swaps or splicing. For now you may want to consider using a third party service for this, like Boltz.