Source: Dungeon Master's Guide

Wondrous Item, Common

As a Bonus Action, you can transform this walking cane into an ordinary Longsword or change the Longsword back into a walking cane. In either case, you must be holding the item.