1. Cut kernels from corn, reserving cobs. In a large saucepan, heat oil on medium. Add corn kernels, celery and light parts of onions and cook, stirring, often, until celery and onions are translucent, 6 to 8 minutes. Add garlic, 1/4 tsp salt and pepper, and cook, stirring, until fragrant, about 30 seconds.
2. Meanwhile, snap reserved corn cobs in half. In a separate saucepan, bring corn cobs and chicken broth to a boil. Reduce heat to medium-low, cover and cook for 5 minutes. Strain through a fine mesh sieve into corn mixture; discard corn cobs. Bring to a boil. Reduce heat to low and cook,
stirring occasionally, until corn kernels are tender, 8 to 10 minutes.
3. Using a slotted spoon, transfer about 1 cup of the corn kernel mixture to a blender; add coconut milk and puree until smooth.
4. Stir chicken and sweet potato into broth mixture. Increase heat to medium, cover and cook, stirring occasionally, until chicken is cooked through and sweet potato is tender, 3 to 5 minutes.
5. Stir in coconut milk mixture and cook until heated through. Remove from heat and stir in dark green parts of onions, basil and remaining 1/4 tsp salt. To serve, top with coconut flakes.