Medicine

45-year-old presents with persistent productive cough and clubbing. On auscultation, wheeze and crackles are present. Which is the most specific investigation to confirm the diagnosis?